{% extends "base-log.html" %}


{% block title %}Account Login{% endblock %}
{% if messages %}
<ul>
	{% for message in messages %}
	<li>{{ message }}</li>
	{% endfor %}
</ul>
{% endif %}

{% block content %}

<div class="form-actions span7 offset4" align="center" >

	{% if form.errors %}
	<div class="alert alert-danger">
		<p>用户名与密码不匹配, 请重试!</p>
	</div>
	{% endif %}

	<form action="" method="post" class="" >
		{% csrf_token %}
		<table border="0" cellpadding="0" >
			<tr>
				<td>{{ form.username.label_tag }}</td>
				<td>{{ form.username }}</td>
			</tr>
			<tr>
				<td>{{ form.password.label_tag }}</td>
				<td>{{ form.password }}</td>
			</tr>
		</table>
		<br>
		<input type="hidden" value="{{ next }}" name="next" />
		<div class="control-group" align="center">
			<div class="btn-group">
				<a href="{%url 'register'%}" class="btn btn-info">注册商户</a>
			</div>
			<div class="btn-group">
				<input type="submit"  class="btn btn-primary" value="登录"/>
			</div>
			<div class="btn-group">
				<a href="{%url 'login'%}" class="btn btn-info">返回网站首页</a>
			</div>
		</div>

	</form>
</div>
{% endblock %}
